package demo08;

import red.OpenMode;

import java.util.ArrayList;

public class NormalMode implements OpenMode {
    @Override
    public ArrayList<Integer> divide(final int totalMoney, final int totalCount) {

        ArrayList<Integer> arrayList=new ArrayList<>();
        int avg=totalCount/totalMoney;
        int remain=totalCount%totalMoney;
        for (int i = 0; i < totalCount-1; i++) {
            arrayList.add(avg);
        }
        arrayList.add(avg+remain);
        return arrayList;
    }
}
